namespace DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data
{
    using DotNetNuke.Framework;
    using System;
    using System.Data;

    public abstract class DataProvider
    {
        private static DataProvider objProvider = null;
        private const string ProviderAssemblyName = "DotNetNuke.Provider.DBLoggingProvider";
        private const string ProviderNamespace = "DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data";
        private const string ProviderType = "data";

        static DataProvider()
        {
            CreateProvider();
        }

        public abstract void AddLog(string LogGUID, string LogTypeKey, int LogUserID, string LogUserName, int LogPortalID, string LogPortalName, DateTime LogCreateDate, string LogServerName, string LogProperties, int LogConfigID);
        public abstract void AddLogType(string LogTypeKey, string LogTypeFriendlyName, string LogTypeDescription, string LogTypeCSSClass, string LogTypeOwner);
        public abstract void AddLogTypeConfigInfo(bool LoggingIsActive, string LogTypeKey, string LogTypePortalID, int KeepMostRecent, bool EmailNotificationIsActive, int Threshold, int NotificationThresholdTime, int NotificationThresholdTimeType, string MailFromAddress, string MailToAddress);
        public abstract void ClearLog();
        private static void CreateProvider()
        {
            objProvider = (DataProvider) Reflection.CreateObject("data", "DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data", "DotNetNuke.Provider.DBLoggingProvider");
        }

        public abstract void DeleteLog(string LogGUID);
        public abstract void DeleteLogType(string LogTypeKey);
        public abstract void DeleteLogTypeConfigInfo(string ID);
        public abstract IDataReader GetEventLogPendingNotif(int LogConfigID);
        public abstract IDataReader GetEventLogPendingNotifConfig();
        public abstract IDataReader GetLog();
        public abstract IDataReader GetLog(int PortalID);
        public abstract IDataReader GetLog(string LogType);
        public abstract IDataReader GetLog(int PageSize, int PageIndex);
        public abstract IDataReader GetLog(int PortalID, string LogType);
        public abstract IDataReader GetLog(int PortalID, int PageSize, int PageIndex);
        public abstract IDataReader GetLog(string LogType, int PageSize, int PageIndex);
        public abstract IDataReader GetLog(int PortalID, string LogType, int PageSize, int PageIndex);
        public abstract IDataReader GetLogTypeConfigInfo();
        public abstract IDataReader GetLogTypeConfigInfoByID(int ID);
        public abstract IDataReader GetLogTypeInfo();
        public abstract IDataReader GetSingleLog(string LogGUID);
        public static DataProvider Instance()
        {
            return objProvider;
        }

        public abstract void PurgeLog();
        public abstract void UpdateEventLogPendingNotif(int LogConfigID);
        public abstract void UpdateLogType(string LogTypeKey, string LogTypeFriendlyName, string LogTypeDescription, string LogTypeCSSClass, string LogTypeOwner);
        public abstract void UpdateLogTypeConfigInfo(string ID, bool LoggingIsActive, string LogTypeKey, string LogTypePortalID, int KeepMostRecent, string LogFileName, bool EmailNotificationIsActive, int Threshold, int NotificationThresholdTime, int NotificationThresholdTimeType, string MailFromAddress, string MailToAddress);
    }
}

